package com.baichen.spring;

import com.baichen.spring.animal.Cat;
import com.baichen.spring.animal.Dog;

public class Main {
    public static void main(String[] args) throws Exception {
        ApplicationContext context = new ApplicationContext("com.baichen.spring");
        Cat cat = (Cat) context.getBean("Cat");
        Dog dog = (Dog) context.getBean("mydog");
        System.out.println(cat);
        System.out.println(dog);
        System.out.println(dog.cat);
    }
}
